//
// Created by DengLibin on 2019/1/31 0031.
//

#ifndef WXWIDGETS_CONSUMER_H
#define WXWIDGETS_CONSUMER_H

#include <wx/thread.h>
#include <iostream>
#include <vector>
using namespace std;
/**
 * 消费者线程
 */
class Consumer : public wxThread {
private:
    wxMutex * mutex; //互斥锁
    wxCondition * condition; //条件变量
    vector<int> * buf; // 缓存池
    int bufSize = 0;//缓冲池大小
    int consumNum = 0;//消费元素个数
public:
    //消费
    Consumer( wxMutex * mutex, wxCondition * condition, vector<int> * buf,int bufSize);
    void * Entry() HAVE_OVERRIDE;
};


#endif //WXWIDGETS_CONSUMER_H
